package com.wx.config;

import com.wx.pojo.Dog;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * SpringBoot 推荐使用注解来给容器注册组件
 */
@Configuration
public class MyAppConfig {

    @Bean
    public Dog dog() {
        Dog dog = new Dog();
        dog.setName("皮卡丘");
        dog.setAge(5);
        return dog;
    }
}
